Arithmetic coding is a relatively new lossless data compression technique that has attracted much attention in recent years. Such coding is useful for video compression, text or data file compression and anything needing lossless data compression. It provides more flexibility and better efficiency than the Huffman coding. Arithmetic coding completely bypasses the traditional coding paradigm: replacing an input symbol with a specific code. Instead, it represents a stream of input symbols by a binary number in the interval [0,1) which evolves as each input symbol is encoded. The longer the message, the more bits are needed to specify this number. This approach totally relaxes the constraint upon Huffman coding: each symbol has to be encoded by an integral number of bits and by at least one bit. Thus, its coding results can be closer to Shannon's entropy bound.
Arithmetic coding originated from the general concept due to Shannon that a code string can be viewed as a binary fraction pointing to the subinterval for a particular symbol sequence. This concept has been applied to successive subdivision of the interval. A LIFO-form (last-in-first-out) of arithmetic codes has been introduced and has been modified to a FIFO-form (first-in-first-out).